package com.tc.project.system.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.tc.project.system.domain.SysUser;
import com.tc.project.system.mapper.SysUserMapper;
import com.tc.project.system.service.ISysUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author TianChao
 * @since 2020-05-16
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Autowired
    SysUserMapper sysUserMapper;
    /**
     * security专用
     *
     * @param username 用户名
     * @return
     */
    @Override
    public SysUser selectUserByUsername(String username) {
        return sysUserMapper.selectOne(new SysUser().setUserName(username));
    }
}
